package com.example.work_3_4;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class SecondActvity extends Activity{
		private Intent intent;
		private Bundle bunde;
		protected void onCreate(Bundle savedInstanceState){
			super.onCreate(savedInstanceState);
			setContentView(R.layout.activity_second);
			Bundle bunde=this.getIntent().getExtras();
			String ans = bunde.getString("ans");
			String sexText ="";
			if(ans.equals("in")){
				sexText="ture";
			}else{
				sexText="wrong";
			}
			TextView tv1= (TextView) findViewById(R.id.t1);
			tv1.setText("Your choose is:" + sexText);
			Button btn3_back =(Button) findViewById(R.id.btn1_back);
			btn3_back.setOnClickListener(new Button.OnClickListener(){
			public void onClick(View v) {
				SecondActvity.this.setResult(RESULT_OK,intent);
				SecondActvity.this.finish();
			}
			});
		}
}
